package com.org.model;

/**
 * ProductCategoryBrandId entity. @author MyEclipse Persistence Tools
 */

public class ProductCategoryBrandId implements java.io.Serializable {

	// Fields

	private ProductCategory productCategory;
	private Brand brand;

	// Constructors

	/** default constructor */
	public ProductCategoryBrandId() {
	}

	/** full constructor */
	public ProductCategoryBrandId(ProductCategory productCategory, Brand brand) {
		this.productCategory = productCategory;
		this.brand = brand;
	}

	// Property accessors

	public ProductCategory getProductCategory() {
		return this.productCategory;
	}

	public void setProductCategory(ProductCategory productCategory) {
		this.productCategory = productCategory;
	}

	public Brand getBrand() {
		return this.brand;
	}

	public void setBrand(Brand brand) {
		this.brand = brand;
	}

	public boolean equals(Object other) {
		if ((this == other))
			return true;
		if ((other == null))
			return false;
		if (!(other instanceof ProductCategoryBrandId))
			return false;
		ProductCategoryBrandId castOther = (ProductCategoryBrandId) other;

		return ((this.getProductCategory() == castOther.getProductCategory()) || (this
				.getProductCategory() != null
				&& castOther.getProductCategory() != null && this
				.getProductCategory().equals(castOther.getProductCategory())))
				&& ((this.getBrand() == castOther.getBrand()) || (this
						.getBrand() != null
						&& castOther.getBrand() != null && this.getBrand()
						.equals(castOther.getBrand())));
	}

	public int hashCode() {
		int result = 17;

		result = 37
				* result
				+ (getProductCategory() == null ? 0 : this.getProductCategory()
						.hashCode());
		result = 37 * result
				+ (getBrand() == null ? 0 : this.getBrand().hashCode());
		return result;
	}

}